<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">    

    <link href="${resource(dir: 'css', file: 'bootstrap.css')}" rel="stylesheet"/>
    <style type="text/css">
    body {
      padding-top: 40px;
      padding-bottom: 40px;
      background-color: #eee;
    }

    .form-signin {
      max-width: 330px;
      padding: 15px;
      margin: 0 auto;
    }
    .form-signin .form-signin-heading,
    .form-signin .checkbox {
      margin-bottom: 10px;
    }
    .form-signin .checkbox {
      font-weight: normal;
    }
    .form-signin .form-control {
      position: relative;
      font-size: 16px;
      height: auto;
      padding: 10px;
      -webkit-box-sizing: border-box;
         -moz-box-sizing: border-box;
              box-sizing: border-box;
    }
    .form-signin .form-control:focus {
      z-index: 2;
    }
    .form-signin input[type="text"] {
      margin-bottom: -1px;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }
    .form-signin input[type="password"] {
      margin-bottom: 10px;
      border-top-left-radius: 0;
      border-top-right-radius: 0;
    }
    </style>

    <script type="text/javascript" src="${resource(dir: 'js', file: 'jquery-2.0.3.js')}"></script>
    <script type="text/javascript" src="${resource(dir: 'js', file: 'bootstrap.js')}"></script>

	<title><g:message code="springSecurity.login.title"/></title>
</head>

<body>

    <div class="container">

      <form class="form-signin" action="${postUrl}" method='POST' id='loginForm' autocomplete='off' >
        <h2 class="form-signin-heading"><g:message code="springSecurity.login.header"/></h2>

		<g:if test='${flash.message}'>
			<div class='login_message'>${flash.message}</div>
		</g:if>

        <input type="text" class="form-control" placeholder="<g:message code="springSecurity.login.username.label"/>" name='j_username' id='username' required autofocus>
        <input type="password" class="form-control" placeholder="<g:message code="springSecurity.login.password.label"/>" name='j_password' id='password' required>
        <label class="checkbox">
          <input type="checkbox" name='${rememberMeParameter}' id='remember_me' <g:if test='${hasCookie}'>checked='checked'</g:if>><g:message code="springSecurity.login.remember.me.label"/>
        </label>
        <button class="btn btn-lg btn-primary btn-block" type="submit" id="submit">${message(code: "springSecurity.login.button")}</button>
      </form>

    </div> <!-- /container -->

<script type='text/javascript'>
	<!--
	(function() {
		document.forms['loginForm'].elements['j_username'].focus();
	})();
	// -->
</script>
</body>
</html>
